package com.myexam.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.myexam.service.TeacherService;
import com.opensymphony.xwork2.ActionSupport;
@Controller
@Scope("prototype")
public class ExamUpdateAction extends ActionSupport {

	private static final long serialVersionUID = -1373788006250153356L;
	@Autowired
	private TeacherService teacherService;
	private int exam_id;
	private int examStage;
	public int getExam_id() {
		return exam_id;
	}
	public void setExam_id(int exam_id) {
		this.exam_id = exam_id;
	}
	public int getExamStage() {
		return examStage;
	}
	public void setExamStage(int examStage) {
		this.examStage = examStage;
	}
	
	public String execute()throws Exception{
		teacherService.examUpdate(exam_id, examStage);
		return SUCCESS;
	}
	
}
